package com.fudan.backend.service;

import com.fudan.backend.exception.RetCode;
import com.fudan.backend.pojo.StoreOpenRequest;
import com.github.pagehelper.PageInfo;

public interface StoreOpenRequestService {
     /**
     * 新增一条开店申请
     *
     * @param storeOpenRequest
     * @return 返回对应状态码
     */
    RetCode addStoreOpenRequest(StoreOpenRequest storeOpenRequest);

    /**
     * @param current  当前页码
     * @param pageSize 页面大小
     * @return 所有开店申请的页面信息
     */
    PageInfo<StoreOpenRequest> getAllStoreOpenRequest(int current, int pageSize);

    /**
     * 通过openRequestId获取OpenRequest信息
     * @param storeOpenRequestId
     * @return 根据storeOpenRequestId返回对应的StoreOpenRequest, 如果找不到则返回错误信息
     */
    StoreOpenRequest getStoreOpenRequestByStoreOpenRequestId(String storeOpenRequestId);


    /**
     * 处理开店申请
     * @param storeOpenRequest
     * @return 如果成功返回成功信息, 如果找不到则返回相应错误的错误信息
     */
    RetCode processStoreOpenRequest(StoreOpenRequest storeOpenRequest);

    /**
     * @param current  当前页码
     * @param pageSize 页面大小
     * @return 根据userId获取所有开店申请的页面信息
     */
    PageInfo<StoreOpenRequest> getAllStoreOpenRequestByUserId(int current, int pageSize, String userId);

}
